package com.edu.service.queryanswer.impl;

import com.edu.entity.queryanswer.Answer;
import com.edu.entity.queryanswer.AnswerVo;
import com.edu.mapper.queryanswer.AnswerMapper;
import com.edu.service.queryanswer.AnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnswerServiceImpl implements AnswerService {
    @Autowired
    private AnswerMapper answerMapper;
    @Override
    public void insertanswer(Answer answer) {
       answerMapper.insertAnswer(answer);
        System.out.println(answer.getQueryId().getClass());
    }

    @Override
    public List<AnswerVo> selectAnswer(Integer id) {
        return answerMapper.selectAnswer(id);
    }

    @Override
    public void insertzan(Integer id) {
        answerMapper.insertzan(id);
    }

    @Override
    public void caina(Integer id) {
      answerMapper.caina(id);
    }
}
